const MYSQL_POOL = require('../mysql/pool.js')
const TEST_TABLE = 'test';

// 登录记录
module.exports = async ctx => {
	// ctx.redirect('/cart');
	console.log('get:',ctx.query)
	console.log('post:',ctx.request.body)
    const data = await MYSQL_POOL("INSERT INTO " + TEST_TABLE + "(name) VALUES('" + ctx.query.name + "')")
    ctx.state.data = data
}
